namespace FileDirUtils
{
    public class FileCompareDecorator : IFileCompare
    {
        private IFileCompare baseComparer;
        private IFileCompare decorator;
        public FileCompareDecorator(IFileCompare baseComparer, IFileCompare decorator)
        {
            this.baseComparer = baseComparer;            
            this.decorator = decorator;            
        }
    
        public FileCompareResult CompareFiles(string fileName1, string fileName2)
        {
            FileCompareResult bres= baseComparer.CompareFiles(fileName1, fileName2);
            if (bres != FileCompareResult.OK)
                return bres;
            return decorator.CompareFiles(fileName1, fileName2);
        }
    }
}